import java.util.Random;

public class Janken {

    public static void main(String[] args) {

        Random random = new Random(Integer.valueOf(args[0]));
        int A = random.nextInt(3);
        int B = random.nextInt(3);

        System.out.println("A出: " + getRes(A));
        System.out.println("B出: " + getRes(B));
        if (A == B) {
            System.out.println("平局");
        } else if ((A == 2 && B == 1) || (A == 1 && B == 0) || (A == 0 && B == 2)) {
            System.out.println("A赢了");
        } else {
            System.out.println("A输了");
        }
    }

    public static String getRes(int value) {
        if (value == 2) {
            return "石头";
        } else if (value == 1) {
            return "剪刀";
        } else {
            return "布";
        }

    }
}
